﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Exam.Utility;
using static System.Reflection.Metadata.BlobBuilder;
namespace Exam.DBManager.DBContexts
{
    public partial class ExamDbContext : DbContext
    {

        private string m_ConnectionString;
        public ExamDbContext(Exam.Utility.ConfigService config)
        {
            m_ConnectionString = config.GetConnectionString();
        }
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            optionsBuilder.UseMySql(m_ConnectionString, ServerVersion.AutoDetect(m_ConnectionString));
            base.OnConfiguring(optionsBuilder);
        }
    }
}
